﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GUI_Workbench
{
   
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            char[] inputc;
            string input, output;
            input = textBox1.Text;
            inputc = input.ToCharArray();
            output = null;
            
            if (input == "")
                MessageBox.Show("Please enter somthing into the source textbox", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            else
            {
                for (int x = input.Length - 1; x >= 0; x--)
                {
                    output = output + (char) (inputc[x] + 128);
                }
            }
            textBox2.Text = output;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            char[] inputc;
            string input, output;
            input = textBox1.Text;
            inputc = input.ToCharArray();
            output = null;

            if (input == "")
                MessageBox.Show("Please enter somthing into the source textbox", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            else
            {
                for (int x = input.Length - 1; x >= 0; x--)
                {
                    output = output + (char)(inputc[x] - 128);
                }
            }
            textBox2.Text = output;
        }

        private void button3_Click(object sender, EventArgs e)
        {
            AboutBox1 box = new AboutBox1();
            box.Show();
        }
    }
}
